package com.kuafood.flutter_kuafood_camera

import android.content.Context
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.StandardMessageCodec
import io.flutter.plugin.platform.PlatformView
import io.flutter.plugin.platform.PlatformViewFactory

class KuaFoodCameraViewFactory(private val messager: BinaryMessenger): PlatformViewFactory(StandardMessageCodec.INSTANCE) {

    override fun create(context: Context?, viewId: Int, args: Any?): PlatformView {
        val params = args as HashMap<String, Any>

        return KuaFoodCameraViewController(context = requireNotNull(context), id = viewId, messenger = messager, params = params);

    }

}